﻿@model DishOrder
@{
    ViewBag.Title = "订单查看";
    Layout = "~/Views/Shared/_LayoutFormDetailView.cshtml";
}
@section Up{
    @Html.HiddenFor(model => model.Id)
    @Html.nbTextBoxFor(model => model.State).ReadOnly()
    @Html.nbTextBoxFor(model => model.TotalCost).ReadOnly()
    @Html.nbTextBoxFor(model => model.ReportUserName).ReadOnly()
    @Html.nbDateFor(model => model.ReportDate).ReadOnly()
    @Html.nbTextAreaFor(model => model.Remark).ReadOnly()
}
@section Down{
    @(Html.nbFormListFor<DishOrderItemView>(s =>
    {
        s.ID("MaterialList");
        s.Action(@Url.Action("EditList"));
        s.ExtParam(new { OrderId = "$('#Id').val()" });
        s.layoutW(10);
        s.layoutH(223);
        s.Columns(c =>
        {
            c.Bind(e => e.Id).IsKey();
            c.BindEnum(e => e.Category, "DishType").Width(40).Title("类别");
            c.BindEnum(e => e.MainMaterialType, "MaterialCategory").Width(60).Title("主料分类");
            c.Bind(e => e.Name).Width(100).Align(GridAlign.Left).Title("菜肴名称");
            c.Bind(e => e.ItemDesc).Width(140).Title("品名信息").Align(GridAlign.Left);
            c.Bind(e => e.Count).Width(40).Align(GridAlign.Right).Title("客数");
            c.Bind(e => e.DishCost).Width(50).Align(GridAlign.Right).Title("预计成本");
            c.Bind(e => e.TotalCost).Align(GridAlign.Right).Width(50).Title("预计总价");
        });
        s.ShowCheckBox(false);
        s.UsePager(false);
    }))
}
